function screen.drawDisc(screendisc, xdisc,ydisc, rayondisc, couleurdisc)
	a=0
	while a < (math.rad(360/4)) do
		screen.drawFillRect(screendisc, xdisc, ydisc, (math.cos(a)*rayondisc) + xdisc, -(math.sin(a)*rayondisc) + ydisc, couleurdisc)
		screen.drawFillRect(screendisc, xdisc, ydisc, (math.cos(a)*rayondisc) + xdisc, (math.sin(a)*rayondisc) + ydisc, couleurdisc)
		screen.drawFillRect(screendisc, xdisc, ydisc, -(math.cos(a)*rayondisc) + xdisc, -(math.sin(a)*rayondisc) + ydisc, couleurdisc)
		screen.drawFillRect(screendisc, xdisc, ydisc, -(math.cos(a)*rayondisc) + xdisc, (math.sin(a)*rayondisc) + ydisc, couleurdisc)
		a = a + 0.01
	end
end

function screen.drawCercle(screendisc, xdisc,ydisc, rayondisc, couleurdisc)
	a=0
	while a < (math.rad(360/4)) do
		screen.drawLine(screendisc, (math.cos(a-0.005)*rayondisc) + xdisc, -(math.sin(a-0.005)*rayondisc) + ydisc, (math.cos(a)*rayondisc) + xdisc, -(math.sin(a)*rayondisc) + ydisc, couleurdisc)
		screen.drawLine(screendisc, (math.cos(a-0.005)*rayondisc) + xdisc, (math.sin(a-0.005)*rayondisc) + ydisc, (math.cos(a)*rayondisc) + xdisc, (math.sin(a)*rayondisc) + ydisc, couleurdisc)
		screen.drawLine(screendisc, -(math.cos(a-0.005)*rayondisc) + xdisc, -(math.sin(a-0.005)*rayondisc) + ydisc, -(math.cos(a)*rayondisc) + xdisc, -(math.sin(a)*rayondisc) + ydisc, couleurdisc)
		screen.drawLine(screendisc, -(math.cos(a-0.005)*rayondisc) + xdisc, (math.sin(a-0.005)*rayondisc) + ydisc, -(math.cos(a)*rayondisc) + xdisc, (math.sin(a)*rayondisc) + ydisc, couleurdisc)
		a = a + 0.01
	end
end

function screen.drawSoftRect(screensr, xsra, ysra, xsrb, ysrb, couleursr)
	if (xsrb-xsra) > (ysrb-ysra) then
		rayonsr = math.floor((xsrb-xsra)*10/100)
	else
		rayonsr = math.floor((ysrb-ysra)*10/100)
	end
	a=0
	screen.drawFillRect(screensr, xsra+rayonsr, ysra, xsrb-rayonsr, ysrb, couleursr)
	screen.drawFillRect(screensr, xsra, ysra+rayonsr, xsrb, ysrb-rayonsr, couleursr)
	while a < (math.rad(360/4)) do
		screen.drawFillRect(screensr, xsrb-rayonsr, ysra+rayonsr, (math.cos(a)*rayonsr) + xsrb-rayonsr, -(math.sin(a)*rayonsr) + ysra+rayonsr, couleursr)
		screen.drawFillRect(screensr, xsrb-rayonsr, ysrb-rayonsr, (math.cos(a)*rayonsr) + xsrb-rayonsr, (math.sin(a)*rayonsr) + ysrb-rayonsr, couleursr)
		screen.drawFillRect(screensr, xsra+rayonsr, ysra+rayonsr, -(math.cos(a)*rayonsr) + xsra+rayonsr, -(math.sin(a)*rayonsr) + ysra+rayonsr, couleursr)
		screen.drawFillRect(screensr, xsra+rayonsr, ysrb-rayonsr, -(math.cos(a)*rayonsr) + xsra+rayonsr, (math.sin(a)*rayonsr) + ysrb-rayonsr, couleursr)
		a = a + 0.01
	end
end

function screen.drawEllipse(screenellipse, xellipse, yellipse, rayonellipsea, rayonellipseb, couleurellipse)
	a=0
	while a < (math.rad(360/4)) do
		screen.drawLine(screenellipse, (math.cos(a-0.005)*rayonellipsea) + xellipse, -(math.sin(a-0.005)*rayonellipseb) + yellipse, (math.cos(a)*rayonellipsea) + xellipse, -(math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		screen.drawLine(screenellipse, (math.cos(a-0.005)*rayonellipsea) + xellipse, (math.sin(a-0.005)*rayonellipseb) + yellipse, (math.cos(a)*rayonellipsea) + xellipse, (math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		screen.drawLine(screenellipse, -(math.cos(a-0.005)*rayonellipsea) + xellipse, -(math.sin(a-0.005)*rayonellipseb) + yellipse, -(math.cos(a)*rayonellipsea) + xellipse, -(math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		screen.drawLine(screenellipse, -(math.cos(a-0.005)*rayonellipsea) + xellipse, (math.sin(a-0.005)*rayonellipseb) + yellipse, -(math.cos(a)*rayonellipsea) + xellipse, (math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		a = a + 0.01
	end
end

function screen.drawFillEllipse(screenellipse, xellipse, yellipse, rayonellipsea, rayonellipseb, couleurellipse)
	a=0
	while a < (math.rad(360/4)) do
		screen.drawFillRect(screenellipse, xellipse, yellipse, (math.cos(a)*rayonellipsea) + xellipse, -(math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		screen.drawFillRect(screenellipse, xellipse, yellipse, (math.cos(a)*rayonellipsea) + xellipse, (math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		screen.drawFillRect(screenellipse, xellipse, yellipse, -(math.cos(a)*rayonellipsea) + xellipse, -(math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		screen.drawFillRect(screenellipse, xellipse, yellipse, -(math.cos(a)*rayonellipsea) + xellipse, (math.sin(a)*rayonellipseb) + yellipse, couleurellipse)
		a = a + 0.01
	end
end

function screen.drawCrossRect(screencr, xcra, ycra, xcrb, ycrb, couleurcr)
	if (xcrb-xcra) > (ycrb-ycra) then
		rayoncr = math.floor((xcrb-xcra)*10/100)
	else
		rayoncr = math.floor((ycrb-ycra)*10/100)
	end
	screen.drawFillRect(screencr, xcra+rayoncr, ycra, xcrb-rayoncr, ycrb, couleurcr)
	screen.drawFillRect(screencr, xcra, ycra+rayoncr, xcrb, ycrb-rayoncr, couleurcr)
end

function screen.drawJewelRect(screenjr, xjra, yjra, xjrb, yjrb, couleurjr)
	if (xjrb-xjra) > (yjrb-yjra) then
		rayonjr = math.floor((xjrb-xjra)*10/100)
	else
		rayonjr = math.floor((yjrb-yjra)*10/100)
	end
	a=0
	screen.drawFillRect(screenjr, xjra+rayonjr, yjra, xjrb-rayonjr, yjrb, couleurjr)
	screen.drawFillRect(screenjr, xjra, yjra+rayonjr, xjrb, yjrb-rayonjr, couleurjr)
	while a < rayonjr do
		screen.drawLine(screenjr, xjra+a, yjra+rayonjr, xjra+rayonjr, yjra+a, couleurjr)
		screen.drawLine(screenjr, xjrb-a, yjra+rayonjr, xjrb-rayonjr, yjra+a, couleurjr)
		screen.drawLine(screenjr, xjra+a, yjrb-rayonjr, xjra+rayonjr, yjrb-a, couleurjr)
		screen.drawLine(screenjr, xjrb-rayonjr, yjrb-a, xjrb-a, yjrb-rayonjr, couleurjr)
		a = a + 0.1
	end
end

function screen.drawRomanRect(screenrr, xrra, yrra, xrrb, yrrb, couleurrr)
	if (xrrb-xrra) > (yrrb-yrra) then
		rayonrr = math.floor((xrrb-xrra)*10/100)
	else
		rayonrr = math.floor((yrrb-yrra)*10/100)
	end
	a=0
	screen.drawFillRect(screenrr, xrra+rayonrr, yrra, xrrb-rayonrr, yrrb, couleurrr)
	screen.drawFillRect(screenrr, xrra, yrra+rayonrr, xrrb, yrrb-rayonrr, couleurrr)
	while a < (math.rad(360/4)) do
		screen.drawFillRect(screenrr, (xrra+rayonrr), (yrrb-rayonrr), (xrra+rayonrr)-rayonrr+(math.cos(a)*rayonrr),(yrrb-rayonrr)+rayonrr-(math.sin(a)*rayonrr), couleurrr) --bas gauche
		screen.drawFillRect(screenrr, (xrra+rayonrr), (yrra+rayonrr), (xrra+rayonrr)-rayonrr+(math.cos(a)*rayonrr),(yrra+rayonrr)-rayonrr+(math.sin(a)*rayonrr), couleurrr) --haut gauche
		screen.drawFillRect(screenrr, (xrrb-rayonrr), (yrrb-rayonrr), (xrrb-rayonrr)+rayonrr-(math.cos(a)*rayonrr),(yrrb-rayonrr)+rayonrr -(math.sin(a)*rayonrr), couleurrr) --bas droite
		screen.drawFillRect(screenrr, (xrrb-rayonrr), (yrra+rayonrr),(xrrb-rayonrr)+rayonrr -(math.cos(a)*rayonrr),(yrra+rayonrr)-rayonrr+ (math.sin(a)*rayonrr), couleurrr) --haut droite
		a = a + 0.01
	end
end
